package cn.tunyun.web.controller;

import cn.tunyun.common.CommonResult;
import cn.tunyun.domain.VipStandard;
import cn.tunyun.service.IVipStandard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/vipCourseView")
public class VipStandardController {

    @Autowired
    private IVipStandard iVipStandard;
    @RequestMapping("/findAll")
    public CommonResult findAll(){
        System.out.println("进来了");
        List<VipStandard> alllist = iVipStandard.findAll();
        if (alllist!=null&&!alllist.isEmpty()){
            return CommonResult.success(alllist);
        }
        else {
            return CommonResult.failed();
        }
    }
}
